import axios from 'axios';

let util = {

};
util.title = function (title) {
    title = '运营端';
    window.document.title = title;
};


const ajaxUrl = process.env.NODE_ENV === 'development' ?
    'http://127.0.0.1:6090/':
    process.env.NODE_ENV === 'production' ?
        'http://127.0.0.1:6090/' :
        'http://127.0.0.1:6090/';


// const ajaxUrl = process.env.NODE_ENV === 'development' ?
//     'http://10.0.251.180:8080/xoms-front/':
//     process.env.NODE_ENV === 'production' ?
//         'http://10.0.251.180:8080/xoms-front/' :
//         'http://10.0.251.180:8080/xoms-front/';
util.baseUrl = ajaxUrl;

util.ajax = axios.create({
    baseURL: ajaxUrl,
    timeout: 30000
});

export default util;